package br.com.massai.view.utils;

import javax.inject.Named;

@Named
public class NavigationUtil {

	public static final String TO_HOME = "home";
	public static final String TO_PAGES_HOME = "pages/home";
	public static final String TO_LOGIN = "login";

	private NavigationUtil() { }

	public static void toHome() {
		FacesUtil.redirectTo(TO_HOME);
	}

	public static void toPagesHome() {
		FacesUtil.redirectTo(TO_PAGES_HOME);
	}

	public static void toLogin() {
		FacesUtil.obterFacesContext().getExternalContext().getSession(true);
		FacesUtil.redirectTo(FacesUtil.obterCaminhoContexto() + "/" + TO_LOGIN);
	}
}
